﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NovoItem.aspx.cs" Inherits="CavinatorSite.NovoItem" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Novo Item</title>
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/bootstrap-responsive.css" rel="stylesheet" />
    <script src="js/jquery-min.js"></script>

    <style>
        #rodape {
            position: absolute;
            bottom: 0;
            text-align: center;
            width: 100%;
        }
    </style>

</head>
<body style="background-color: #4274B9">
    <form id="form1" runat="server">
        <div class='bloco clearfix' style='background: url(img/fundo_page.png) no-repeat; min-width: 100%; background-size: cover; min-height: 100%;'>
            <!-- Menu -->
            <div>
                <nav class="navbar navbar-inverse" role="navigation">
                    <div class="container-fluid">
                        <!-- Brand and toggle get grouped for better mobile display -->
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"><span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
                            <a class="navbar-brand" style="color: #FFFFFF" href="#">Cavinator</a>
                        </div>

                        <!-- Collect the nav links, forms, and other content for toggling -->
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav">
                                <li class="active"><a href="Home.aspx">Home <span class="sr-only">(current)</span></a></li>
                                <li class="active"><a href="Jogo.aspx">Jogo</a></li>
                                <li class="active"><a href="Credito.aspx">Créditos</a></li>
                            </ul>
                        </div>
                        <!-- /.navbar-collapse -->
                    </div>
                    <!-- /.container-fluid -->
                </nav>
            </div>
            <!-- Fim Menu -->
            <div class="container-fluid">
                <div class="row-fluid" style="width: 38%; margin-top: 9%; margin-left: 31.4%;">
                    <div class="panel with-nav-tabs panel-warning">
                        <div class="panel-heading">
                            <ul class="nav nav-tabs">
                                <li class="active"><a href="#tab1" data-toggle="tab">Perguntas Respondidas</a></li>
                                <li><a href="#tab2" data-toggle="tab">Novo Item</a></li>
                            </ul>
                        </div>
                        <div class="panel-body">
                            <div class="tab-content">
                                <div class="tab-pane fade in active" id="tab1" style="height: 500px; overflow-y: auto;">
                                    <asp:Repeater ID="Repeater2" runat="server">
                                        <ItemTemplate>
                                            <div class="span6" style="margin-left: 0;">
                                                <label style="font-weight: normal;">
                                                    <span class="icon icon-question-sign" aria-hidden="true"></span><b>Pergunta nº: <%# Container.ItemIndex + 1 %></b>
                                                    <br />
                                                     <asp:HiddenField runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Question.Id") %>' ID="hdQuestionID" />
                                                <asp:HiddenField runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Question.Value") %>' ID="hdQuestionValue" />
                                                    <%# DataBinder.Eval(Container.DataItem, "Question.Value") %>
                                                </label>
                                            </div>
                                            <div class="span4" style="margin-left: 0;">
                                                <label style="font-weight: normal;">
                                                    <span class="icon icon-exclamation-sign" aria-hidden="true"></span><b>Resposta  </b>
                                                    <br />
                                                    <asp:HiddenField runat="server" Value=' <%# DataBinder.Eval(Container.DataItem, "AnswerValue") %>' ID="hdAnswerValue" />
                                                    <%# DataBinder.Eval(Container.DataItem, "AnswerValue") %>
                                                </label>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                                <div class="tab-pane fade" id="tab2" style="height: 500px; overflow-y: auto;">
                                    <div class="span10" style="margin-left: 0;">
                                        <label>Animal</label><br />
                                        <asp:TextBox runat="server" CssClass="input-prepend" ID="txtNomeAnimal" Width="500"></asp:TextBox>
                                        <br />
                                        <br />
                                    </div>

                                    <asp:Repeater ID="Repeater1" runat="server">
                                        <ItemTemplate>
                                            <div class="span6" style="margin-left: 0;">
                                                <label style="font-weight: normal;">
                                                    <span class="icon icon-question-sign" aria-hidden="true"></span><b>Pergunta nº: <%# Container.ItemIndex + 1 %></b>
                                                    <br />
                                                    <%# DataBinder.Eval(Container.DataItem, "Value") %>
                                                </label>
                                                <asp:HiddenField runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Id") %>' ID="hdIdPergunta" />
                                                <asp:HiddenField runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "Value") %>' ID="hdfValue" />
                                            </div>
                                            <div class="span4" style="margin-left: 0;">
                                                <label style="font-weight: normal;">
                                                    <span class="icon icon-exclamation-sign" aria-hidden="true"></span><b>Resposta  </b>
                                                    <br />
                                                    <asp:TextBox ID='txtAnswer' runat="server"></asp:TextBox>
                                                </label>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    <div class="span6">
                                         <asp:Button runat="server" ID="btnAddNovoItem" Text="Salvar" CssClass=" btn btn-primary" OnClick="BtnAddNovoItemClick" />
                                    </div>

                                   
                                </div>
                            </div>
                        </div>
                        <div class="panel-footer">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="rodape" style="background-color: #000000; color: #FFFFFF">
            <p>Todos Direitos Reservados a Turma XIII de Engenharia da Computação - 2014 </p>
        </div>
        <script src='js/jquery-min.js'> </script>
        <script src='js/bootstrap.js'> </script>
        <script>
            $(document).ready(function () {
                var altura_tela = $(window).height();/*cria variável com valor do altura da janela*/
                $(".bloco").height(altura_tela); /* aplica a variável a altura da div*/
                $(window).resize(function () {
                    /*quando redimensionar a janela faz a mesma coisa */
                    var altura_tela = $(window).height();
                    $(".bloco").height(altura_tela);
                });
            });
        </script>
    </form>
</body>
</html>
